package com.example.e_comm.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.e_comm.entity.Role;

import java.util.List;

public interface RoleService extends IService<Role> {
    void assignPermission(Long roleId, List<Long> pIds);
    List<Role> getRolesByUserId(Long userId);
    Role getRoleWithPermissions(Long roleId);

    // 修改这里：把 String keyword 换成 LambdaQueryWrapper<Role>
    IPage<Role> search(Page<Role> page, LambdaQueryWrapper<Role> wrapper);
}